package com.xx.job.common.util;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class VerifyValidateUtil {

    public static Boolean verifyValidate(HttpSession session,String validate){
        /*HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        HttpSession session = request.getSession();*/
        String validate1 = (String) session.getAttribute("validate");
        if(MD5Util.MD5(validate.toLowerCase()).equals(validate1)){
            return true;
        }
        return false;
    }
}
